package cn.zzuisa.news.service.impl;

import cn.zzuisa.news.entity.User;
import cn.zzuisa.news.form.UserEditForm;
import cn.zzuisa.news.repository.UserRepository;
import cn.zzuisa.news.repository.dao.UserDAO;
import cn.zzuisa.news.service.UserService;

/**
 * @ClassName: UserServiceImpl.java
 * @Description: TODO
 * @author zzuisa
 * @version V1.0
 * @Date 2018年9月4日 上午11:07:51
 */
public class UserServiceImpl implements UserService {

	private UserRepository userDAO = new UserDAO();

	@Override
	public User login(String username, String password) {
		// TODO Auto-generated method stub
		return userDAO.login(username, password);
	}

	@Override
	public int addpoint(Integer id) {
		// TODO Auto-generated method stub
		return userDAO.addpoint(id);
	}

	@Override
	public User findByUsername(String username) {
		// TODO Auto-generated method stub
		return userDAO.findByUsername(username);
	}

	@Override
	public boolean edit(UserEditForm userEditForm) {
		// TODO Auto-generated method stub
		return userDAO.edit(userEditForm);
	}

	@Override
	public boolean editState(Integer id, Integer key) {
		// TODO Auto-generated method stub
		return userDAO.editState(id, key);
	}

}
